<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>订单管理</title>

	<%-- 静态包含 base标签、css样式、jQuery文件 --%>
	<%@ include file="/pages/common/head.jsp"%>
<script type="text/javascript">
	$(function () {
		$("#change_status").click(function () {
			return confirm("你确定要发货吗?");
		})
	})
</script>

</head>
<body>
	
	<div id="header">
			<span class="wel_word">订单管理系统</span>

		<%-- 静态包含 manager管理模块的菜单  --%>
		<%@include file="/pages/common/manager_menu.jsp"%>

	</div>
	
	<div id="main">
		<table>
			<tr>
				<td>日期</td>
				<td>金额</td>
				<td>详情</td>
				<td>发货</td>
				
			</tr>
			<c:forEach items="${requestScope.Allorders}" var="orders">
				<tr>
					<td>${orders.createTime}</td>
					<td>${orders.price}</td>
					<td><a href="orderServlet?action=queryOrderItems&orderid=${orders.orderId}">查看详情</a></td>
					<td><c:if test="${orders.status==0}">
						<a id="change_status" href="orderServlet?action=changeOrderStatus&orderid=${orders.orderId}&status=${orders.status}">点击发货</a>
					</c:if>
						<c:if test="${orders.status==1}">
							待收货
						</c:if>
						<c:if test="${orders.status==2}">
							完成收货
						</c:if>
					</td>
				</tr>
			</c:forEach>
		</table>
	</div>


	<%--静态包含页脚内容--%>
	<%@include file="/pages/common/footer.jsp"%>


</body>
</html>